package com.example.boardroom.demo.room;

import androidx.room.Entity;
import androidx.room.PrimaryKey;

import com.example.boardroom.newItems.HardBean;

@Entity
public class HardwareControlTable {
    @PrimaryKey(autoGenerate = true)
    public int tid;
    public String timeStamp;
    public Integer id;
    public String deviceName;
    public String deviceModel;
    public String deviceNumber;
    public String deviceStatus;
    public String deviceType;
    public String connectStatus;
    public String openStatus;//1代表开 2代表关
    public String areaNumber;

    public HardwareControlTable(String timeStamp, HardBean.DataDTO dataDTO) {
        this.timeStamp = timeStamp;
        id = dataDTO.id;
        deviceName = dataDTO.deviceName;
        deviceModel = dataDTO.deviceModel;
        deviceNumber = dataDTO.deviceNumber;
        deviceStatus = dataDTO.deviceStatus;
        deviceType = dataDTO.deviceType;
        connectStatus = dataDTO.connectStatus;
        openStatus = dataDTO.openStatus;
        areaNumber = dataDTO.areaNumber;
    }

    public HardwareControlTable() {
    }

    @Override
    public String toString() {
        return "HardwareControlTable{" +
                "tid=" + tid +
                ", timeStamp='" + timeStamp + '\'' +
                ", id=" + id +
                ", deviceName='" + deviceName + '\'' +
                ", deviceModel='" + deviceModel + '\'' +
                ", deviceNumber='" + deviceNumber + '\'' +
                ", deviceStatus='" + deviceStatus + '\'' +
                ", deviceType='" + deviceType + '\'' +
                ", connectStatus='" + connectStatus + '\'' +
                ", openStatus='" + openStatus + '\'' +
                ", areaNumber='" + areaNumber + '\'' +
                '}';
    }
}
